package com.khalil.kkadmin.infrastructure.jpa;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@EnableJpaRepositories(basePackages = "com.khalil.kkadmin", repositoryBaseClass = KkJpaRepositoryImpl.class)
@EnableJpaAuditing(auditorAwareRef = "defaultSpringSecurityAuditorAware")
@Configuration
public class KkJpaConfig {

    @Bean
    public DefaultWebAuditorAware defaultSpringSecurityAuditorAware() {
        return new DefaultWebAuditorAware();
    }
}
